<!DOCTYPE html>
<html>

<head>
    <meta charset="utf-8">
    <script type="text/javascript" src="../../../js/boot.js"></script>
</head>

<body>
    <textarea id="content" style="width:100%;height:100%;"></textarea>
</body>

<script type="text/javascript">

    function setContent(content) {
        // editor.setContent(content);
    }

    $(document).ready(function () {
        debugger
        var parent = window.parent;
        var html = parent.getHtmlCode();
        var code = html.innerHTML;
        // console.log(code);
        $("#content").text(code);
    });

    // ctrl+S保存事件
    document.onkeydown = function () {
        var oEvent = window.event;
        if (oEvent.keyCode == 83 && oEvent.ctrlKey) {
            alert("你按下了ctrl+S");
            return false;
        }
    }

    function updateCodeArea() {
        var parent = window.parent;
        var html = parent.getHtmlCode();
        var code = html.innerHTML;
        $("#content").text(code);
    }

    // 教程地址：https://ueditor.baidu.com/website/onlinedemo.html
</script>

</html>